ProgressEvent: loaded property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Note: This feature is available in Web Workers.
The ProgressEvent.loaded
read-only property is a number indicating the size of the data already transmitted or processed.
The progress ratio can be calculated by dividing the value of this property by ProgressEvent.total
.
For ProgressEvent
s dispatched by the browser in HTTP messages, the value refers to the amount of bytes of a resource that are completed, and is derived from the Content-Length
header.
For compressed requests of unknown total size, loaded
might contain the size of the compressed or decompressed data, depending on the browser.
As of 2024, it contains the size of the compressed data in Firefox, and the size of the uncompressed data in Chrome.
In a ProgressEvent
you create yourself, you can assign any numeric value to loaded
that represents the amount of work completed relative to the total
value.
Value
A number.
Specifications
Specification |
---|
XMLHttpRequest # dom-progressevent-loaded |
Browser compatibility
See also
- The
ProgressEvent
interface it belongs to.